import java.io.IOException;
import java.io.InputStream;
import java.net.InetAddress;
import java.net.URL;
import java.net.URLConnection;
import java.net.UnknownHostException;

public class Ping {
    public static void main(String[] args) throws IOException {
        URLConnection conn = new URL("http://extramobi.ru").openConnection();
        long start = System.currentTimeMillis();
        conn.connect();
        conn.getInputStream();
        long end = System.currentTimeMillis();
        System.out.println(end - start);
    }
}
